home *** CD-ROM | disk | FTP | other *** search
/ SuperModels in the Rainforest / SuperModels in the Rainforest.iso / rain.dxr / 00517_slide show stuff.ls < prev    next >
Encoding:
Text File  |  1995-10-13  |  1.5 KB  |  57 lines

  1. on shReadSlides
  2.   global glShotList, giShotListIndex
  3.   if the machineType < 256 then
  4.     set infile to FileIO(mnew, "?Read", "SHOT")
  5.   else
  6.     set infile to FileIO(mnew, "?Read", "Sho")
  7.   end if
  8.   if objectp(infile) then
  9.     set glShotList to []
  10.     set tempSubject to "a"
  11.     repeat while tempSubject <> EMPTY
  12.       set tempSubject to infile(mReadLine)
  13.       set tempIndex to infile(mReadLine)
  14.       if tempSubject = EMPTY then
  15.         exit repeat
  16.       end if
  17.       put EMPTY into char length(tempSubject) of tempSubject
  18.       append(glShotList, tempSubject)
  19.       append(glShotList, value(tempIndex))
  20.     end repeat
  21.     infile(mdispose)
  22.   end if
  23.   cNextShot(1)
  24. end
  25.  
  26. on shWriteSlides
  27.   if the machineType < 256 then
  28.     set outfile to FileIO(mnew, "?Write", "My Shot List")
  29.   else
  30.     set outfile to FileIO(mnew, "?Write", "ShotList.SHO")
  31.   end if
  32.   if objectp(outfile) then
  33.     set temp to 1
  34.     repeat while temp < count(glShotList)
  35.       outfile(mWriteString, string(getAt(glShotList, temp)) & RETURN)
  36.       set temp to temp + 1
  37.       outfile(mWriteString, getAt(glShotList, temp) & RETURN)
  38.       set temp to temp + 1
  39.     end repeat
  40.     if the machineType < 256 then
  41.       outfile(mSetFinderInfo, "SHOT", "CHER")
  42.     end if
  43.     outfile(mdispose)
  44.   end if
  45.   updateStage()
  46. end
  47.  
  48. on shDeleteShot
  49.   global giShotListIndex, glShotList, biggie
  50.   set holderlist to count(glShotList)
  51.   if holderlist > 2 then
  52.     deleteAt(glShotList, giShotListIndex)
  53.     deleteAt(glShotList, giShotListIndex)
  54.   end if
  55.   cNextShot(-1)
  56. end
  57.